<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // function Pig(name,age,color){
    //   this.name=name
    //   this.age=age
    //   this.color=color
    // }
    // const peiqi= new Pig('章若楠',24,'blue')
    // const me= new Pig('zzy',24,'blue')
    // console.log(peiqi);
    // console.log(me);

    // const obj={
    //   name:'篮球',
    //   price: 999,
    //   age:19
    // }
    
    // console.log(Object.keys(obj))
    // console.log(Object.values(obj))
    // // console.log(Object.values(obj))
    // obj2={}
    // Object.assign(obj2,obj)
    // obj2.name='zuq'
    // console.log(obj2);
    const products = [  
  {  
    id: 1,  
    price: 9.99,  
    name: "商品1",  
    imageUrl: "https://example.com/images/product1.jpg",  
    shippingAddress: "收货地址1"  
  },  
  {  
    id: 2,  
    price: 19.99,  
    name: "商品2",  
    imageUrl: "https://example.com/images/product2.jpg",  
    shippingAddress: "收货地址2"  
  },  
  {  
    id: 3,  
    price: 29.99,  
    name: "商品3",  
    imageUrl: "https://example.com/images/product3.jpg",  
    shippingAddress: "收货地址3"  
  }
];

  const finds=products.every(item=>item.id===2)
  console.log(finds);
  </script>
</body>
</html>